home *** CD-ROM | disk | FTP | other *** search
/ Aminet 37 / Aminet 37 (2000)(Schatztruhe)[!][Jun 2000].iso / Aminet / dev / misc / TCS.lha / TCS / includes / libraries / tcs.i < prev   
Text File  |  2000-04-13  |  10KB  |  305 lines

  1. ******************************************************************************
  2. * tcs.i 21.4.1 (12.4.2000) - © 2000 Simone Bevilacqua
  3. *
  4. * public definitions
  5. ******************************************************************************
  6.  
  7.  
  8.  
  9. ******************************************************************************
  10. * TCSBase structure / TCSNAME macro
  11.  
  12.     rsreset
  13. TCSBase    rs.b    $22    ;LIB_SIZE=$22
  14. tcsb_flgs    rs.b    1
  15. tcsb_pad    rs.b    1
  16. tcsb_SegLst    rs.l    1
  17. tcsb_DOSBase    rs.l    1
  18. tcsb_BFRPDIAdr    rs.l    1    ;DI structure of display under Blitter-assisted FullRes pass
  19. tcsb_BFRPStts    rs.b    1    ;Blitter-assisted FullRes pass status:
  20.             ;2=VdoPln1 being converted;
  21.             ;1=VdoPln0 being converted;
  22.             ;0=not converting
  23. TCSBase_SzOf    rs.b    0
  24.  
  25.  
  26.  
  27.     macro    TCSNAME
  28.     dc.b    "tcs.library",0
  29.     endm
  30.  
  31.  
  32.  
  33. ******************************************************************************
  34. * VideoModes definitions, bits and flags
  35.  
  36. TCS_VM_RGBW    =    0    ;white mode
  37. TCS_VM_RGBM    =    1    ;modify mode
  38. TCS_VM_RGBS    =    2    ;strengthen mode
  39. TCS_VM_RGBP    =    3    ;pair mode
  40. TCS_VM_RGB332    =    4    ;332 mode
  41. TCS_VM_RGBH    =    5    ;hacked (332) mode
  42. TCS_VM_last    =    5    ;index of last mode
  43.  
  44. TCS_VMb_FPfld    =    24    ;use as front playfield only
  45. TCS_VMb_BltFRP    =    25    ;enable Blitter-assisted FullRes
  46. TCS_VMb_TriBuf    =    26    ;enable triple buffering
  47. TCS_VMb_DubBuf    =    27    ;enable double buffering
  48. TCS_VMb_FullRes    =    28    ;enable 140ns pixels mode
  49. TCS_VMb_MskPln    =    29    ;enable MskPln
  50. TCS_VMb_HScrl    =    30    ;enable horizontal scrolling
  51. TCS_VMb_chqr    =    31    ;enable ChqrMode
  52.  
  53. TCS_VMf_FPfld    =    1<<TCS_VMb_FPfld
  54. TCS_VMf_BltFRP    =    1<<TCS_VMb_BltFRP
  55. TCS_VMf_TriBuf    =    1<<TCS_VMb_TriBuf
  56. TCS_VMf_DubBuf    =    1<<TCS_VMb_DubBuf
  57. TCS_VMf_FullRes    =    1<<TCS_VMb_FullRes
  58. TCS_VMf_MskPln    =    1<<TCS_VMb_MskPln
  59. TCS_VMf_HScrl    =    1<<TCS_VMb_HScrl
  60. TCS_VMf_chqr    =    1<<TCS_VMb_chqr
  61.  
  62.  
  63.  
  64. ******************************************************************************
  65. * ClippingWindow structure
  66.  
  67.     rsreset
  68. TCS_CW_btm    rs.w    1    ;bottom side y coordinate
  69. TCS_CW_top    rs.w    1    ;top side y coordinate
  70. TCS_CW_rt    rs.w    1    ;right side x coordinate
  71. TCS_CW_lf    rs.w    1    ;left side x coordinate
  72. TCS_CW_SzOf    rs.b    0
  73.  
  74.  
  75.  
  76. ******************************************************************************
  77. * GraphicContext bits, flags and structure
  78.  
  79. TCS_GCb_clp    =    0    ;enable clipping
  80. TCS_GCb_fill    =    1    ;enable filling
  81. TCS_GCb_eor    =    2    ;enable exclusive-or drawing (STILL UNSUPPORTED)
  82.  
  83. TCS_GCf_clp    =    1<<TCS_GCb_clp
  84. TCS_GCf_fill    =    1<<TCS_GCb_fill
  85. TCS_GCf_eor    =    1<<TCS_GCb_eor
  86.  
  87.     rsreset
  88. TCS_GC_flgs    rs.w    1    ;drawing mode flags
  89. TCS_GC_ClpWin    rs.b    TCS_CW_SzOf    ;ClippingWindow structure
  90. TCS_GC_SzOf    rs.b    0
  91.  
  92.  
  93.  
  94. ******************************************************************************
  95. * DisplayLimitations definitions
  96.  
  97. TCS_DL_MinX0    =    ($18*2+17+16)*4    ;minimum horizontal start
  98. TCS_DL_MaxX1    =    ($d8*2+17)*4    ;maximum horizontal position
  99. TCS_DL_MinY0    =    $1d    ;minimum vertical start
  100. TCS_DL_MaxY1    =    TCS_DL_MinY0+283    ;maximum vertical position
  101. TCS_DL_MinWd    =    128    ;minimum display width in SHRES pixels
  102. TCS_DL_MinHt    =    1    ;minimum display height in pixels
  103.  
  104.  
  105.  
  106. ******************************************************************************
  107. * DisplayDeclaration structure
  108.  
  109.     rsreset
  110. TCS_DD_VdoMode    rs.l    1    ;display video mode
  111. TCS_DD_UsrLst0    rs.l    1    ;user copperlist0 address
  112. TCS_DD_UsrLst1    rs.l    1    ;user copperlist1 address
  113. TCS_DD_DsplX0    rs.w    1    ;coordinate of top-left pixel
  114. TCS_DD_DsplY0    rs.w    1    ;of display window (SHRES)
  115. TCS_DD_DsplX1    rs.w    1    ;coordinate of bottom-right pixel
  116. TCS_DD_DsplY1    rs.w    1    ;of display window (SHRES)
  117. TCS_DD_ScrWd    rs.w    1    ;screen width in TCS pixels
  118. TCS_DD_ScrHt    rs.w    1    ;screen height in lines
  119. TCS_DD_brtns    rs.w    1    ;start brightness
  120. TCS_DD_GfxCtxt    rs.b    TCS_GC_SzOf    ;GraphicContext structure
  121. TCS_DD_SzOf    rs.b    0
  122.  
  123.  
  124.  
  125. ******************************************************************************
  126. * DisplayStatus bits and flags
  127.  
  128. TCS_DSb_shwn    =    0    ;display currently shown
  129. TCS_DSb_BPfld    =    1    ;display used for back playfield
  130. TCS_DSb_FPfld    =    2    ;display used for front playfield
  131. TCS_DSb_DXPfld    =    3    ;Cross Playfield in Dual mode
  132.  
  133. TCS_DSf_shwn    =    1<<TCS_DSb_shwn
  134. TCS_DSf_BPfld    =    1<<TCS_DSb_BPfld
  135. TCS_DSf_FPfld    =    1<<TCS_DSb_FPfld
  136. TCS_DSf_DXPfld    =    1<<TCS_DSb_DXPfld
  137.  
  138.  
  139.  
  140. ******************************************************************************
  141. * DisplayInfo structure
  142.  
  143.     rsreset
  144. TCS_DI_mrk    rs.l    1    ;safety keyword
  145. TCS_DI_VdoMode    rs.l    1    ;as "tuned" by InitPlns()
  146. TCS_DI_MainLst    rs.l    1    ;main copperlist address
  147. TCS_DI_PalLst    rs.l    1    ;normal palette copperlist address
  148. TCS_DI_XPfldLst    rs.l    1    ;Cross Playfield palette copperlist address
  149. TCS_DI_BufLsts    rs.l    1    ;buffering copperlists buffer address
  150. TCS_DI_UsrLst0    rs.l    1    ;user copperlist #0 address
  151. TCS_DI_UsrLst1    rs.l    1    ;user copperlist #1 address
  152. TCS_DI_BufLstA    rs.l    1    ;available copperlist address
  153. TCS_DI_BufLstP    rs.l    1    ;physic copperlist address
  154. TCS_DI_BufLstR    rs.l    1    ;ready copperlist address
  155. TCS_DI_BufLstL    rs.l    1    ;logic copperlist adrress
  156. TCS_DI_VdoPln0A    rs.l    1    ;plane useable for next rendering
  157. TCS_DI_VdoPln0L    rs.l    1    ;plane being used for rendering
  158. TCS_DI_VdoPln0R    rs.l    1    ;plane waiting to be displayed
  159. TCS_DI_VdoPln0P    rs.l    1    ;plane being displayed
  160. TCS_DI_VdoPln1A    rs.l    1    ;plane useable for next rendering
  161. TCS_DI_VdoPln1L    rs.l    1    ;plane being used for rendering
  162. TCS_DI_VdoPln1R    rs.l    1    ;plane waiting to be displayed
  163. TCS_DI_VdoPln1P    rs.l    1    ;plane being displayed
  164. TCS_DI_SlcPln0    rs.l    1    ;SlcPln0 address
  165. TCS_DI_SlcPln1    rs.l    1    ;SlcPln1 address
  166. TCS_DI_MskPln    rs.l    1    ;MskPln address
  167. TCS_DI_PlnSz    rs.l    1    ;size of a plane in bytes
  168. TCS_DI_CSAdr    rs.l    1    ;ChnkScr address
  169. TCS_DI_CSSz    rs.l    1    ;ChnkScr size in bytes
  170. TCS_DI_BltFRBuf    rs.l    1    ;Blitter-assisted FullRes pass buffer address
  171. TCS_DI_OPfldDI    rs.l    1    ;other playfield DI structure address
  172. TCS_DI_BFRPVP0    rs.l    1    ;VdoPlane0 adr for Blitter-assisted FullRes pass
  173. TCS_DI_AmigaPal    rs.l    32    ;32-bit Amiga actual palette buffer
  174. TCS_DI_PlnWd    rs.w    1    ;plane width in bytes
  175. TCS_DI_PlnHt    rs.w    1    ;plane height in pixels
  176. TCS_DI_PlnMod    rs.w    1    ;plane modulo in bytes
  177. TCS_DI_CSWd    rs.w    1    ;ChnkScr width in pixels/bytes
  178. TCS_DI_CSHt    rs.w    1    ;ChnkScr height in pixels
  179. TCS_DI_CSMod    rs.w    1    ;ChnkScr modulo in bytes
  180. TCS_DI_DsplX0    rs.w    1    ;coordinate of top-left corner of
  181. TCS_DI_DsplY0    rs.w    1    ;display window (as DIWSTRT+DIWHIGH)
  182. TCS_DI_DsplX1    rs.w    1    ;coordinate of bottom-right corner of
  183. TCS_DI_DsplY1    rs.w    1    ;display window (as DIWSTOP+DIWHIGH)
  184. TCS_DI_DsplWd    rs.w    1    ;display width in SHRES pixels
  185. TCS_DI_DsplHt    rs.w    1    ;display height in lines
  186. TCS_DI_DsplBrtns    rs.w    1    ;display current brightness
  187. TCS_DI_ScrXPos    rs.w    1    ;screen horizontal position
  188. TCS_DI_ScrYPos    rs.w    1    ;screen vertical position
  189. TCS_DI_FPfldOpct    rs.w    1    ;front playfield opacity
  190. TCS_DI_GfxCtxt    rs.b    TCS_GC_SzOf    ;GraphicContext structure
  191. TCS_DI_TrnspCol    rs.b    1    ;RGBx transparent color in Dual Cross Playfield
  192. TCS_DI_DsplStts    rs.b    1    ;display status flags
  193. TCS_DI_SzOf    rs.b    0
  194.  
  195.  
  196.  
  197. ******************************************************************************
  198. * MainCopperList structure
  199.  
  200.     rsreset
  201. TCS_MCL_DIWSTRT    rs.w    2
  202. TCS_MCL_DIWSTOP    rs.w    2
  203. TCS_MCL_DIWHIGH    rs.w    2
  204. TCS_MCL_PushPC0    rs.w    4    ;return address #0 to COP1LC
  205. TCS_MCL_UsrLst0    rs.w    6    ;gosub user coplst #0 or "fake" wait
  206. TCS_MCL_RetAdr0    rs.b    0    ;return address #0
  207. TCS_MCL_DDFSTRT    rs.w    2
  208. TCS_MCL_DDFSTOP    rs.w    2
  209. TCS_MCL_BPLCON0    rs.w    2
  210. TCS_MCL_BPLCON2    rs.w    2
  211. TCS_MCL_BPLCON4    rs.w    2
  212. TCS_MCL_BPL1MOD    rs.w    2
  213. TCS_MCL_BPL2MOD    rs.w    2
  214. TCS_MCL_SlcPln0    rs.w    4    ;(BPL3PT)
  215. TCS_MCL_SlcPln1    rs.w    4    ;(BPL4PT)
  216. TCS_MCL_MskPln    rs.w    4    ;(BPL5PT)
  217. TCS_MCL_PushPC1    rs.w    4    ;return address #1 to COP1LC
  218. TCS_MCL_PalLst    rs.w    6    ;gosub palette copperlist
  219. TCS_MCL_RetAdr1    rs.b    0    ;return address #1
  220. TCS_MCL_PushPC2    rs.w    4    ;return address #2 to COP1LC
  221. TCS_MCL_BufLst0    rs.w    6    ;gosub this playfield buffering copperlist
  222. TCS_MCL_RetAdr2    rs.b    0    ;return address #2
  223. TCS_MCL_PushPC3    rs.w    4    ;return address #3 to COP1LC
  224. TCS_MCL_BufLst1    rs.w    6    ;gosub other playfield buffering copperlist
  225. TCS_MCL_RetAdr3    rs.b    0    ;return address #3
  226. TCS_MCL_PushPC4    rs.w    4    ;return address #4 to COP1LC
  227. TCS_MCL_ChqrLst    rs.w    6    ;gosub chequer copperlist
  228. TCS_MCL_RetAdr4    rs.b    0    ;return address #4
  229. TCS_MCL_RestPC    rs.w    4    ;start address to COP1LC
  230. TCS_MCL_UsrLst1    rs.w    6    ;gosub user coplst #1 or $fffffffe
  231. TCS_MCL_SzOf    rs.b    0
  232.  
  233.  
  234.  
  235. ******************************************************************************
  236. * BufferingCopperList structure
  237.  
  238.     rsreset
  239. TCS_BCL_BPLCON1    rs.w    2    ;(scrolling must affect only logical screens)
  240. TCS_BCL_pln0    rs.w    4    ;(BPL1PT: VdoPln0; BPL5PT or BPL6PT: FPfldPln0)
  241. TCS_BCL_pln1    rs.w    4    ;(BPL2PT: VdoPln1; BPL6PT or BPL7PT: FPfldPln1)
  242. TCS_BCL_ret0    rs.w    2    ;return to main copperlist
  243. TCS_BCL_chqr    rs.b    0    ;start of chequer copperlist
  244. TCS_BCL_ret1    rs.w    2    ;return to main copperlist
  245. TCS_BCL_SzOf    rs.b    0
  246.  
  247.  
  248.  
  249. ******************************************************************************
  250. * CrossPlayfieldCopperList structure
  251.  
  252. TCS_D_PalCMNo    =    1+32    ;number of COPMOVEs to BPLCON3 & COLORxx per chunk
  253.  
  254.     rsreset
  255. TCS_XPCL_pal    rs.l    TCS_D_PalCMNo*8    ;crossed-palette copperlist (8 chunks max)
  256. TCS_XPCL_ret    rs.w    2    ;return to main copperlist
  257. TCS_XPCL_SzOf    rs.b    0
  258.  
  259.  
  260.  
  261. ******************************************************************************
  262. * PictureErrcodes definitions
  263.  
  264. TCS_PE_LOWMEM    =    0    ;not enough memory
  265. TCS_PE_IO    =    1    ;I/O error
  266. TCS_PE_BADIFF    =    2    ;uncorrect IFF file
  267. TCS_PE_BADILBM    =    3    ;uncorrect ILBM file
  268. TCS_PE_DSPL    =    4    ;couldn't open TCS display
  269. TCS_PE_OK    =    5    ;anything >= is OK
  270.  
  271.  
  272.  
  273. ******************************************************************************
  274. * ILBMInfo structure
  275.  
  276.     rsreset
  277. TCS_II_BufAdr    rs.l    1    ;user specified buffer address
  278. TCS_II_GfxAdr    rs.l    1    ;chunky graphics address
  279. TCS_II_PalAdr    rs.l    1    ;raw 24-bit palette address
  280. TCS_II_PalDiff    rs.l    1    ;palette mismatch degree
  281. TCS_II_wd    rs.w    1    ;picture width in pixels
  282. TCS_II_ht    rs.w    1    ;picture height in pixels
  283. TCS_II_PlnsNo    rs.b    1    ;picture # of bitplanes
  284. TCS_II_RGBxMode    rs.b    1    ;one of TCS_VM_RGBx
  285. TCS_II_SzOf    rs.b    0
  286.  
  287.  
  288.  
  289. ******************************************************************************
  290. * IFFHeader structure
  291.  
  292. TCS_D_FORM    =    "TCSH"    ;TCS Header mark
  293. TCS_D_BODY    =    "TCSB"    ;TCS Body mark
  294.  
  295.     rsreset
  296. TCS_IH_PicWd    rs.w    1    ;picture width in pixels
  297. TCS_IH_PicHt    rs.w    1    ;picture height in pixels
  298. TCS_IH_DsplX0    rs.w    1    ;coordinate of top-left corner of
  299. TCS_IH_DsplY0    rs.w    1    ;display window (as DIWSTRT+DIWHIGH)
  300. TCS_IH_DsplX1    rs.w    1    ;coordinate of bottom-right corner of
  301. TCS_IH_DsplY1    rs.w    1    ;display window (as DIWSTOP+DIWHIGH)
  302. TCS_IH_DsplWd    rs.w    1    ;display width in SHRES pixels
  303. TCS_IH_DsplHt    rs.w    1    ;display height in lines
  304. TCS_IH_VdoMode    rs.b    1    ;display video mode
  305. TCS_IH_pad    rs.b    1